package com.sl.happying.reading;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.sql.DataSource;

@EnableTransactionManagement // 启注解事务管理，等同于xml配置方式的 <tx:annotation-driven />
@SpringBootApplication
public class HappyingReadingApplication {

    @Bean
    public Object txManager(PlatformTransactionManager  platformTransactionManager) {
        return new Object();
    }


    public static void main(String[] args){
        SpringApplication.run(HappyingReadingApplication.class, args);
    }


}
